Relational Algebra


Q21.

The join operation can be defined as
GateOverflow

Q22.

Let r be a relation instance with schema R = (A, B, C, D). We define r_{1}=\Pi _{A,B,C}(R) and r_{2}=\Pi _{A,D}(R). Let s=r_1*r_2 where * denotes natural join. Given that the decomposition of r into r_1 and r_2 is lossy, which one of the following is TRUE?
GateOverflow

Q23.

Suppose the adjacency relation of vertices in a graph is represented in a table Adj(X,Y). Which of the following queries cannot be expressed by a relational algebra expression of constant length ?
GateOverflow

Q24.

Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s expression) is incorrect? R_1 and R_2 are relations, C_1 and C_2 are selection conditions and A_1 and A_1 are attributes of R_1.
GateOverflow

Q25.

Given the relations employee (name, salary, dept-no), and department (dept-no, dept-name,address), Which of the following queries cannot be expressed using the basic relational algebra operations \left(\sigma, \pi,\times ,\Join, \cup, \cap,-\right)?
GateOverflow

Q26.

Consider a selection of the form \sigma_{A\leq 100} (r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [0, 500]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query ?
GateOverflow

Q27.

Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples then the maximum and minimum sizes of the join respectively are
GateOverflow

Q28.

Let R1(\underline{A},B,(C)) and R2(\underline{D},E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2 . Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2 . Which one of the following relational algebra expressions would necessarily produce an empty relation?
GateOverflow

Q29.

Given two union compatible relations R_1(A, B) and R_2 (C, D), what is the result of the operation R_1 \Join_{ A = C \wedge B = D} R_2?
GateOverflow

Q30.

Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. Then the relational algebra expression \sigma _{A=a}(r\Join s) is always equal to :
GateOverflow